package org.example.lostandfound.config;

import org.springframework.context.annotation.Bean;
import org.springframework.jdbc.datasource.DriverManagerDataSource;

import javax.sql.DataSource;

public class DataSourceConfig {
    @Bean
    public DataSource dataSource() {
        DriverManagerDataSource dataSource = new DriverManagerDataSource();
        dataSource.setUrl("jdbc:mysql://localhost:3306/lost_and_found");
        dataSource.setUsername("root");
        dataSource.setPassword("123456");
        dataSource .setDriverClassName("com.mysql.jdbc.Driver");
        return dataSource;
    }
}
